{include file="common:header" /}

<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <!-- 头部 -->
    <div class="layui-header">
        <div class="layui-logo">
            <img src="/admin/assets/images/logo.png"/>
            <cite>后台管理</cite>
        </div>
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item" lay-unselect>
                <a ew-event="flexible" title="侧边伸缩"><i class="layui-icon layui-icon-shrink-right"></i></a>
            </li>
            <li class="layui-nav-item" lay-unselect>
                <a ew-event="refresh" title="刷新"><i class="layui-icon layui-icon-refresh-3"></i></a>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item layui-hide-xs" lay-unselect>
                <a ew-event="fullScreen" title="全屏"><i class="layui-icon layui-icon-screen-full"></i></a>
            </li>
            <li class="layui-nav-item layui-hide-xs" lay-unselect>
                <a href="javascript:;" class="logout" link="{:url('Login/logout')}">退出</a>
            </li>
            <li class="layui-nav-item" lay-unselect>
                <a>
                    <img src="/admin/assets/images/head.jpg" class="layui-nav-img">
                    <cite>{$Think.session.aname}</cite>
                </a>
            </li>
            <li class="layui-nav-item" lay-unselect>
                <a ew-event="theme" title="主题"><i class="layui-icon layui-icon-more-vertical"></i></a>
            </li>
        </ul>
    </div>

    <!-- 侧边栏 -->
    {include file="common:left" /}
    <div class="layui-body"></div>
    <!-- 底部 -->
    <!--<div class="layui-footer layui-text text-center">-->
        <!--copyright © 2020 <a href="http://www.exunsoft.cn" target="_blank">ExunSoft.cn</a> all rights reserved.-->
        <!--<span class="pull-right">Version 1.0.8</span>-->
    <!--</div>-->
</div>

<!-- 加载动画 -->
<div class="page-loading">
    <div class="ball-loader">
        <span></span><span></span><span></span><span></span>
    </div>
</div>

<!-- js部分 -->
<script>
    layui.use(['layer', 'admin', 'form', 'table', 'laytpl','index', 'util', 'laydate', 'cascader', 'tagsInput'], function () {
        var $ = layui.jquery;
        var index = layui.index;
        var layer = layui.layer;
        var admin = layui.admin;
        var form = layui.form;
        var table = layui.table;
        var laytpl = layui.laytpl;
        var util = layui.util;
        var laydate = layui.laydate;
        var cascader = layui.cascader;
        // 默认加载主页
        index.loadHome({
            menuPath: "{:url('Index/main')}",
            menuName: '<i class="layui-icon layui-icon-home"></i>'
        });
        $('.logout').click(function () {
            var url = $(this).attr('link');
            layer.confirm('你确定要此操作吗?', {
                icon: 5,
                btn: ['确定', '取消'] //按钮
            }, function () {
                $.get(url, function (data) {
                    if (data.code == 1) {
                        layer.alert(data.msg, {icon: 6}, function (index) {
                            layer.close(index);
                            window.location.reload();
                        });
                    } else {
                        layer.alert(data.msg);
                    }
                });
            });s
        });
        $('.theme').click(function () {
            admin.popupRight({
                type: 2,
                content: "{:url('index')}"
            });
        });


    });
</script>
</body>
</html>